import service from '@/utils/request'
export function IMGApi() {
    const base = "/tbFile"
    const fn = {
      active(params){
        return service({
          url: base + '/statusById',
          method: 'post',
          params
        })
      },
      activeTypeSupplier(params){
        return service({
          url: base + '/statusByTypeSupplierId',
          method: 'post',
          params
        })
      },
      addSupplierByTypeId(params){
        return service({
          url: base + '/addSupplierByTypeId',
          method: 'post',
          params
        })
      },
      delSupplierByTypeSupplierId(params){
        return service({
          url: base + '/delSupplierByTypeSupplierId',
          method: 'post',
          params
        })
      },
      getPage(params) {
        return service({
            url: base + '/selectPage',
            method: 'post',
            data:JSON.stringify(params),
        })
      },
      del(params) {
        return service({
          url: base + '/delById',
          method: 'post',
          params
        })
      },
      // selectAllVariety(id) {
      //   return service({
      //       url: '/CriteriaAPIStructure/selectAllVariety',
      //       method: 'get',
      //   })
      // },
      add(data) {
        return service({
          url: base + '/add',
          method: 'post',
          data:JSON.stringify(data),
        })
      },
      edit(data) {
        return service({
          url: base + '/editById',
          method: 'post',
          data:JSON.stringify(data),
        })
      }
    }
    return fn;
  
  }
  